package com.save.rpgsavedecode.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.ClassUtils;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.io.FileNotFoundException;

@Controller
@RequestMapping()
public class HelloPage {

    @GetMapping()
    public String helloPage(Model model) throws FileNotFoundException {
        String path = ClassUtils.getDefaultClassLoader().getResource("").getPath();
        String path1 = ResourceUtils.getURL("classpath:").getPath();
        String path2 = System.getProperty("user.dir");
        model.addAttribute("path", path);
        model.addAttribute("path1", path1);
        model.addAttribute("path2", path2);
        return "/index";
    }

}
